import * as THREE from "three";


/**
 * 相机初始化
 */
function initCamera(fov = 75, aspect = 1, near = 0.1, far = 3000, position = { x: 1000, y: 1000, z:1000 }) {
    // PerspectiveCamera（透视摄像机） , 视野角度，长宽比，远剪切面，近剪切面
    let camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
    // 摄像机位置移动
    camera.position.x = position.x
    camera.position.y = position.y
    camera.position.z = position.z
    return camera
}

export default {
    initCamera
}
